package 方法;

public class Test2 {
	public static void main(String[] args) {
		MyThread my=new MyThread();
		for (int i = 1; i < 5; i++) {
			Thread th=new Thread(my);
			th.start();
			
		}
		synchronized (my) {
		    my.notify();	
		}
		synchronized (my) {   
			
           my.notifyAll();			
		}
	}

}
